package com.xxx;

import com.test.HelloController;
import com.xxx.controller.TestController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Profile;

//@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan("com")
//@Profile("dev")
public class Springboot03Application {
    //启动类(引导类)
    public static void main(String[] args) {
        final ConfigurableApplicationContext context = SpringApplication.run(Springboot03Application.class, args);
        final TestController testController = context.getBean("testController", TestController.class);
        System.out.println("testController = " + testController);

        final HelloController helloController = context.getBean("helloController", HelloController.class);
        System.out.println("helloController = " + helloController);
    }

}
